package com.zxc.web;

import com.zxc.entity.Dept;
import com.zxc.services.DeptServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
  * @author: zxc
  * @return:
  * @time:  2021/5/21 14:20
  * @description:
  */
@Controller
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptServices deptServices;


    @RequestMapping("/getDeptList")
    @ResponseBody
    public List<Dept> getDeptList(){
        return deptServices.getDeptList();
    }
}

